<?php

class UserErrors
{
	const INVALIDID      	= 10001;
	const INVALIDEMAIL      = 10002;
	const INVALIDPW         = 10003;
	const DOESNOTEXIST      = 10004;
	const NOTASETTING    	= 10005;
	const UNEXPECTEDERROR   = 10006;

	public static function getErrorMessage($code)
	{
		switch($code) {
			case self::INVALIDID:
				return 'Whoa! I think there\'s something wrong with the user id';
				break;

			case self::INVALIDEMAIL:
				return 'The email is invalid!';
				break;

			case self::INVALIDPW:
				return 'The password is shorter than 4 characters!';
				break;

			case self::DOESNOTEXIST:
				return 'That user does not exist!';
				break;

			case self::NOTASETTING:
				return 'That setting does not exist!';
				break;

			case self::UNEXPECTEDERROR:
			default:
				return 'An unexpected error has occurred';
				break;
		}
	}
}


?>